home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / inet / internet-drafts / draft-houttuin-rfc1327-tutor-02.txt < prev    next >
Text File  |  1993-06-07  |  86KB  |  2,185 lines

  1.  
  2.  INTERNET DRAFT                                        Jeroen Houttuin
  3.  RARE WG-MSG                                          RARE Secretariat
  4.  Rev. 3.0                                                  25 May 1993
  5.                                    
  6.        A tutorial on gatewaying between X.400 and Internet mail
  7.                                    
  8.  
  9.  
  10. Abstract
  11.  
  12.     
  13.     There are many ways in which X.400 and Internet (RFC 822) mail
  14.     systems can be interconnected. Addresses and service elements can
  15.     be mapped onto each other in different ways. From the early
  16.     available gateway implementations, one was not necessarily better
  17.     than any other, but the sole fact that each handled the mappings
  18.     in a different way led to major interworking problems, especially
  19.     when a message (or address) crossed more than one gateway. The
  20.     need for one global standard on how to implement X.400 - Internet
  21.     mail gatewaying was satisfied by the Internet Request For Comments
  22.     1327, "Mapping between X.400(1988)/ISO 10021 and RFC 822."
  23.     
  24.     This tutorial was produced to help especially new gateway managers
  25.     find their way into the complicated subject of mail gatewaying
  26.     according to RFC 1327. End-users are encouraged to read the COSINE
  27.     MHS pocket user guide [pug] instead.
  28.     
  29.     The introduction is general enough to be read not only by gateway
  30.     managers, but also by those who are new to e-mail in general.
  31.     Parts of this introduction can be skipped as needed. To a certain
  32.     extent, this document can also be used as a reference guide to
  33.     X.400 <-> RFC 822 gatewaying. Wherever there is a lack of detail
  34.     in the tutorial, it will at least refer to the corresponding
  35.     chapters in other documents. As such, it shields the RFC 1327
  36.     novice from too much detail.
  37.  
  38.  
  39. Status of this Memo
  40.  
  41.     
  42.     The previous version of this document has been proposed by the
  43.     author to the IESG and the RTC to become both an Informational RFC
  44.     and an RTR. For that purpose, this version (3.0) incorporates the
  45.     solicited comments from the IESG and the RTC.
  46.     
  47.     This document is an Internet Draft. Internet Drafts are working
  48.     documents of the Internet Engineering Task Force (IETF), its
  49.     Areas, and its Working Groups. Note that other groups may also
  50.     distribute working documents as Internet Drafts.
  51.     
  52.     Internet Drafts are draft documents valid for a maximum of six
  53.     months. Internet Drafts may be updated, replaced, or obsoleted by
  54.     other documents at any time.  It is not appropriate to use
  55.     Internet Drafts as reference material or to cite them other than
  56.     as a "working draft" or "work in progress."
  57.  
  58.  
  59. Houttuin               Expires November 1993                 [Page 1]
  60.  
  61. Internet-Draft   X.400 - Internet mail gatewaying tutorial   May 1993
  62.  
  63.  
  64.     
  65.     Please check the I-D abstract listing contained in each Internet
  66.     Draft directory to learn the current status of this or any other
  67.     Internet Draft.
  68.     
  69.     Distribution of this memo is unlimited.
  70.  
  71.  
  72. Acknowledgements
  73.  
  74.     
  75.     This tutorial was originally produced by SWITCH within the context
  76.     of the COSINE MHS contract. It is heavily based on other papers
  77.     and books, such as [JH-92], [HTA-faq], [822], [1280], [1310], and
  78.     [1327], from which large parts of text were reproduced (slightly
  79.     edited) by kind permission from the authors.
  80.  
  81.  
  82. Disclaimer
  83.  
  84.     
  85.     This document is not everywhere exact and or complete in
  86.     describing the involved standards. Irrelevant details are left out
  87.     and some concepts are simplified for the ease of understanding.
  88.     For reference purposes, always use the original standards.
  89.  
  90.  
  91. Format
  92.  
  93.     
  94.     This Internet Draft is available in ASCII as well as in Postscript
  95.     format. The index is only available in the Postscript version.
  96.  
  97.  
  98. Contents
  99.  
  100.     1. Introduction                                                 3
  101.       1.1. What is X.400                                            4
  102.       1.2. What is an RFC                                           7
  103.       1.3. What is RFC 822                                          9
  104.       1.4. What is RFC 1327                                        10
  105.       1.5. RFC 822 versus X.400                                    11
  106.     2. What must be mapped                                         11
  107.     3. Address mapping                                             14
  108.       3.1. X.400 addresses                                         14
  109.       3.2. RFC 822 addresses                                       18
  110.       3.3. RFC 1327 address mapping                                19
  111.         3.3.1. Default mapping                                     20
  112.           3.3.1.1. X.400 -> RFC 822                                20
  113.           3.3.1.2. RFC 822 -> X.400                                21
  114.         3.3.2. Exception mapping according to mapping tables       21
  115.           3.3.2.1. PersonalName and localpart mapping              25
  116.  
  117.  
  118. Houttuin               Expires November 1993                 [Page 2]
  119.  
  120. Internet-Draft   X.400 - Internet mail gatewaying tutorial   May 1993
  121.  
  122.  
  123.           3.3.2.2. Mapping between RFC 822 and X.400 domains       25
  124.             3.3.2.2.1. X.400 -> RFC 822                            26
  125.             3.3.2.2.2. RFC 822 -> X.400                            27
  126.       3.4. Table co-ordination                                     30
  127.       3.5. Local additions                                         31
  128.       3.6. Product specific formats                                32
  129.       3.7. Guidelines for mapping rule definition                  33
  130.     4. Conclusion                                                  34
  131.     Appendix A. References                                         35
  132.     Appendix B. Index                  Not available in ASCII version
  133.     Appendix C. Abbreviations                                      36
  134.     Appendix D. Author's address                                   37
  135.  
  136.  
  137. 1. Introduction
  138.  
  139.     
  140.     This chapter describes the history, status, future, and contents
  141.     of the involved standards.
  142.     
  143.     There is a major difference between mail systems used in the USA
  144.     and Europe. Mail systems originated mainly in the USA, where their
  145.     explosive growth started as early as in the seventies. Different
  146.     company-specific mail systems were developed simultaneously,
  147.     which, of course, led to a high degree of incompatibility. The
  148.     Defense Advanced Research Projects Agency (DARPA) which had to use
  149.     machines of many different manufacturers, triggered the
  150.     development of the Internet and the TCP/IP protocol suite, which
  151.     was later accepted as a standard by the US Department of Defense
  152.     (DoD). The Internet mail format is defined in RFC 822 and the
  153.     protocol used for exchanging mail is known as the simple mail
  154.     transfer protocol (SMTP). Together with UUCP and the BITNET
  155.     protocol NJE, SMTP has become one of the main de facto mail
  156.     standards in the US.
  157.     
  158.     Unfortunately, all these protocols were incompatible, which
  159.     explains the need to come to an acceptable global mail standard.
  160.     CCITT and ISO began working on a norm and their work converged in
  161.     what is now known as the X.400 Series Recommendations. One of the
  162.     objectives was to define a super set of the existing systems,
  163.     allowing for easier integration later on. Some typical positive
  164.     features of X.400 are the store-and-forward mechanism, the
  165.     hierarchical address space and the possibility of combining
  166.     different types of body parts into one message body.
  167.     
  168.     In Europe, the mail system boom came later. Since there was not
  169.     much equipment in place yet, it made sense to use X.400 as much as
  170.     possible right from the beginning. A strong X.400 lobby existed,
  171.     especially in West-Germany (DFN). In the R&D world, mostly EAN was
  172.     used because it was the only public domain X.400 product at that
  173.     time.
  174.     
  175.  
  176.  
  177. Houttuin               Expires November 1993                 [Page 3]
  178.  
  179. Internet-Draft   X.400 - Internet mail gatewaying tutorial   May 1993
  180.  
  181.  
  182.     At the moment, the two worlds of X.400 and SMTP are moving towards
  183.     each other. On the one hand, the American Department of Defense,
  184.     one of the main forces behind the Internet, has decided that
  185.     future networking should be based on ISO standards, implying a
  186.     migration from SMTP to X.400. On the other hand X.400 users in
  187.     Europe have a need to communicate with the Internet. Due to the
  188.     large traffic volume between the two nets it is not enough
  189.     interconnecting them with a single international gateway. The load
  190.     on such a gateway would be too heavy. Direct access using local
  191.     gateways is more feasible. A striking example of the opening-up of
  192.     the ISO oriented world is the reorganisation of the RARE working
  193.     groups in June 1992. The new working groups are now also
  194.     discussing non ISO protocols, such as RFC 822.
  195.     
  196.     Although the expected success of X.400 has been a bit
  197.     disappointing (mainly because no good products were available),
  198.     the future of e-mail systems must still be seen in the context of
  199.     this standard.
  200.     
  201.     And although in the long run X.400 is believed to take over the
  202.     world of e-mail systems, SMTP cannot be neglected over the next
  203.     ten years. Especially the simple installation procedure and the
  204.     high degree of connectivity will contribute to a growing number of
  205.     RFC 822 installations in Europe in the near future.
  206.  
  207.  
  208. 1.1. What is X.400
  209.  
  210.     
  211.     In October 1984, the Plenary Assembly of the CCITT accepted a
  212.     standard to facilitate international message exchange between
  213.     subscribers to computer based store-and-forward message services.
  214.     This standard is known as the CCITT X.400 series recommendations
  215.     ([CCITT 84], from now on called X.400(84)) and happens to be the
  216.     first CCITT recommendation for a network application;. It should
  217.     be noted that X.400(84) is based on work done in the IFIP Working
  218.     Group 6.5, and that ISO at the same time was proceeding towards a
  219.     compatible document. However, the standardisation efforts of CCITT
  220.     and ISO did not converge in time (not until the 1988 version), to
  221.     allow the publication of a common text.
  222.     
  223.     X.400(84) triggered the development of software implementing
  224.     (parts of) the standard in the laboratories of almost all major
  225.     computer vendors and many software houses. Similarly, public
  226.     carriers in many countries started to plan X.400(84) based message
  227.     systems that would be offered to the users as value added
  228.     services. Early implementations appeared shortly after first
  229.     drafts of the standard were published and a considerable number of
  230.     commercial systems are available nowadays.
  231.     
  232.     X.400(84) describes a functional model for a Message Handling
  233.     System (MHS) and associates services and protocols. The model
  234.  
  235.  
  236. Houttuin               Expires November 1993                 [Page 4]
  237.  
  238. Internet-Draft   X.400 - Internet mail gatewaying tutorial   May 1993
  239.  
  240.  
  241.     illustrated in the Figure 2.1. defines the components of a
  242.     distributed messaging system:
  243.     
  244.     Users in the MHS environment are provided with the capability of
  245.     sending and receiving messages. Users in the context of an MHS may
  246.     be humans or application processes. The User Agent (UA) is a
  247.     process that makes the services of the MTS available to the user.
  248.     A UA may be implemented as a computer program that provides
  249.     utilities to create, send, receive and perhaps archive messages.
  250.     Each UA, and thus each user, is identified by a name (each user
  251.     has its own UA).
  252.     
  253.     The Message Transfer system (MTS) transfers messages from an
  254.     originating UA to a recipient UA. As implied by the figure shown
  255.     above, data sent from UA to UA may be stored temporarily in
  256.     several intermediate Message Transfer Agents (MTA), i.e. a store-
  257.     and-forward mechanism is being used. An MTA forwards received
  258.     messages to a next MTA or to the recipient UA.
  259.     
  260.     -----------------------------------------------------------------
  261.     |                user        user   Message Handling Environment|
  262.     |                 |            |                                |
  263.     |     ----------------------------------------------------------|
  264.     |     |           |            |    Message Handling System    ||
  265.     |     |         ----          ----                             ||
  266.     |     |         |UA|          |UA|                             ||
  267.     |     |         ----          ----                             ||
  268.     |     |           |             |                              ||
  269.     |     |       -------------------------------------------------||
  270.     |     |       |   |             |   Message Transfer System   |||
  271.     |     | ----  |  -----         -----                          |||
  272.     |user-|-|UA|--|--|MTA|---------|MTA|                          |||
  273.     |     | ----  |  -----         -----                          |||
  274.     |     |       |    \             /                            |||
  275.     |     |       |     \           /                             |||
  276.     |     |       |      \         /                              |||
  277.     |     |       |       \       /                               |||
  278.     |     |       |        \     /                                |||
  279.     |     | ----  |         -----                                 |||
  280.     |user-|-|UA|--|---------|MTA|                                 |||
  281.     |     | ----  |         -----                                 |||
  282.     |     |       -------------------------------------------------||
  283.     |     ----------------------------------------------------------|
  284.     -----------------------------------------------------------------
  285.                    Fig. 2.1. X.400 functional model
  286.     
  287.     X.400(84) divides layer 7 of the OSI Reference Model into 2
  288.     sublayers, the User Agent Layer (UAL) and the Message Transfer
  289.     Layer (MTL) as shown in the following figure:
  290.     
  291.  
  292.  
  293.  
  294.  
  295. Houttuin               Expires November 1993                 [Page 5]
  296.  
  297. Internet-Draft   X.400 - Internet mail gatewaying tutorial   May 1993
  298.  
  299.  
  300.     --------------------------------------------------------------
  301.                 -----                          -----
  302.     UA layer    |UAE|<----- P2, Pc ----------->|UAE|
  303.                 -----                          -----
  304.     --------------------------------------------------------------
  305.                 ------          ------         -----
  306.     MTA layer   |MTAE|<-- P1 -->|MTAE|<-- P3-->|SDE|
  307.                 ------          ------         -----
  308.     --------------------------------------------------------------
  309.           xxxE = xxx Entity ;   SDE = Submission & Delivery Entity
  310.     --------------------------------------------------------------
  311.                        Fig. 2.2. X.400 Protocols
  312.     
  313.     The MTL is involved in the transport of messages from UA to UA,
  314.     using one or several MTAs as intermediaries. By consequence,
  315.     routing issues are entirely dealt with in the MTL. The MTL in fact
  316.     corresponds to the postal service that forwards letters consisting
  317.     of an envelope and a content. Two protocols, P1 and P3, are used
  318.     between the MTL entities (MTA Entity (MTAE), and Submission and
  319.     Delivery Entity (SDE)) to reliably transport messages. The UAL
  320.     embodies  peer UA Entities (UAE), which interpret the content of a
  321.     message and offer specific services to the application process.
  322.     Depending on the application to be supported on top of the MTL,
  323.     one of several end-to-end protocols (Pc) is used between UAEs. For
  324.     electronic mail, X.400(84) defines the protocol P2 as part of the
  325.     InterPersonal Messaging Service (IPMS). Conceivably other UAL
  326.     protocols may be defined, e.g. a protocol to support the exchange
  327.     of electronic business documents.
  328.     
  329.     The structure of an InterPersonal Message (IPM) can be visualised
  330.     as in Figure 2.3. (Note that the envelope is not a part of the
  331.     IPM; it is generated by the MTL).
  332.     
  333.     An IPM heading contains information that is specific for an
  334.     interpersonal message like 'originator', 'subject', etc. Each
  335.     bodypart can contain one information type, text, voice or as a
  336.     special case, a forwarded message. A forwarded message consists of
  337.     the original message together with Previous Delivery Information
  338.     (PDI), which is drawn from the original delivery envelope.
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354. Houttuin               Expires November 1993                 [Page 6]
  355.  
  356. Internet-Draft   X.400 - Internet mail gatewaying tutorial   May 1993
  357.  
  358.  
  359.     
  360.                                                             Forwarded
  361.     Message                                                 IP-message
  362.     -                     ----------      --- ----------    -
  363.     |  message-           |envelope|     /    | PDI    |    |
  364.     |  content   IPM      ----------    /     ----------    |
  365.     |  -         -        ----------   /      ----------    |
  366.     |  |         |  IPM-  |heading |  /       |heading |    |
  367.     |  |         |  body  ---------- /        ----------    |
  368.     |  |         |  -     ----------/         ----------    |
  369.     |  |         |  |     |bodypart|          |bodypart|    |
  370.     |  |         |  |     ----------\         ----------    |
  371.     |  |         |  |     ---------- \        ----------    |
  372.     |  |         |  |     |bodypart|  \       |bodypart|    |
  373.     |  |         |  |     ----------   \      ----------    |
  374.     |  |         |  |          .        \                   |
  375.     |  |         |  |          .         \                  |
  376.     |  |         |  |     ----------      \   ----------    |
  377.     |  |         |  |     |bodypart|       \  |bodypart|    |
  378.     -  -         -  -     ----------        - ----------    -
  379.                                       (PDI = Previous Delivery Info.)
  380.                    Fig. 2.3. X.400 message structure
  381.     
  382.     Early experience with X.400(84) showed that the standard had
  383.     various shortcomings. Therefore CCITT, in parallel with ISO,
  384.     corrected and extended the specification during its 1984 to 1988
  385.     study period and produced a revised standard ([CCITT/ISO 88]),
  386.     which was accepted at the 1988 CCITT Plenary Meeting ([BP-88]).
  387.     Amongst others, X.400(88) differs from X.400(84) in that it
  388.     defines a Message Store (MS), which can be seen as a kind of
  389.     database for messages. An MS enables the end-user to run a UA
  390.     locally, e.g. on a PC, whilst the messages are stored in the MS,
  391.     which is co-located with the MTA. The MTA can thus always deliver
  392.     incoming messages to the MS instead of to the UA. The MS can even
  393.     automatically file incoming messages according to certain
  394.     criteria. Other enhancements in the 88 version concern security
  395.     and distribution lists.
  396.  
  397.  
  398. 1.2. What is an RFC
  399.  
  400.     
  401.     The Internet, a loosely-organised international collaboration of
  402.     autonomous, interconnected networks, supports host-to-host
  403.     communication through voluntary adherence to open protocols and
  404.     procedures defined by Internet Standards. There are also many
  405.     isolated internets, i.e., sets of interconnected networks, that
  406.     are not connected to the Internet but use the Internet Standards.
  407.     The architecture and technical specifications of the Internet are
  408.     the result of numerous research and development activities
  409.     conducted over a period of two decades, performed by the network
  410.  
  411.  
  412.  
  413. Houttuin               Expires November 1993                 [Page 7]
  414.  
  415. Internet-Draft   X.400 - Internet mail gatewaying tutorial   May 1993
  416.  
  417.  
  418.     R&D community, by service and equipment vendors, and by government
  419.     agencies around the world.
  420.     
  421.     In general, an Internet Standard is a specification that is stable
  422.     and well-understood, is technically competent, has multiple,
  423.     independent, and interoperable implementations with operational
  424.     experience, enjoys significant public support, and is recognisably
  425.     useful in some or all parts of the Internet.
  426.     
  427.     The principal set of Internet Standards is commonly known as the
  428.     "TCP/IP protocol suite". As the Internet evolves, new protocols
  429.     and services, in particular those for Open Systems Interconnection
  430.     (OSI), have been and will be deployed in traditional TCP/IP
  431.     environments, leading to an Internet that supports multiple
  432.     protocol suites.
  433.     
  434.     The Internet Activities Board (IAB) is the primary co-ordinating
  435.     committee for Internet design, engineering, and management [1].
  436.     The IAB has delegated to its Internet Engineering Task Force
  437.     (IETF) the primary responsibility for the development and review
  438.     of potential Internet Standards from all sources. The IETF forms
  439.     Working Groups to pursue specific technical issues, frequently
  440.     resulting in the development of one or more specifications that
  441.     are proposed for adoption as Internet Standards.
  442.     
  443.     Final decisions on Internet standardisation are made by the IAB,
  444.     based upon recommendations from the Internet Engineering Steering
  445.     Group (IESG), the leadership body of the IETF. IETF Working Groups
  446.     are organised into areas, and each area is co-ordinated by an Area
  447.     Director. The Area Directors and the IETF Chairman are included in
  448.     the IESG.
  449.     
  450.     Any individual or group (e.g. an IETF working group) can submit a
  451.     document as a so-called Internet Draft. After at least half a
  452.     year, if the document, being well discussed, looks stable, the
  453.     IESG may propose to the IAB to turn the Internet-Draft into a
  454.     'Requests For Comments' (RFC). RFCs cover a wide range of topics,
  455.     from early discussion of new research concepts to status memos
  456.     about the Internet. All Internet Standards are published as RFCs,
  457.     but not all RFCs specify standards.
  458.     
  459.     As an example, this tutorial is also an Internet Draft that is to
  460.     become an Informational RFC later on.
  461.     
  462.     Once a document is assigned an RFC number and published, that RFC
  463.     is never revised or re-issued with the same number.
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472. Houttuin               Expires November 1993                 [Page 8]
  473.  
  474. Internet-Draft   X.400 - Internet mail gatewaying tutorial   May 1993
  475.  
  476.  
  477. 1.3. What is RFC 822
  478.  
  479.     
  480.     RFC 822 defines a standard for the format of Internet text
  481.     messages. Messages consist of lines of text. No special provisions
  482.     are made for encoding drawings, facsimile, speech, or structured
  483.     text. No significant consideration has been given to questions of
  484.     data compression or to transmission and storage efficiency, and
  485.     the standard tends to be free with the number of bits consumed.
  486.     For example, field names are specified as free text, rather than
  487.     special terse codes.
  488.     
  489.     A general "memo" framework is used. That is, a message consists of
  490.     some information in a rigid format (the 'headers'), followed by
  491.     the main part of the message (the 'body'), with a format that is
  492.     not specified in RFC 822. It does define the syntax of several
  493.     fields of the headers section; some of these fields must be
  494.     included in all messages.
  495.     
  496.     RFC 822 is used in conjunction with a number of different message
  497.     transfer protocol environments (822-MTSs).
  498.         
  499.         - SMTP Networks: On the Internet and other TCP/IP networks,
  500.           RFC 822 is used in conjunction with two other standards: RFC
  501.           821, also known as Simple Mail Transfer Protocol (SMTP)
  502.           [821], and RFC 920 which is a Specification for domains and
  503.           a distributed name service [920].
  504.         
  505.         - UUCP Networks: UUCP is the UNIX to UNIX CoPy protocol, which
  506.           is usually used over dialup telephone networks to provide a
  507.           simple message transfer mechanism.
  508.         
  509.         - BITNET: Some parts of Bitnet and related networks use RFC
  510.           822 related protocols, with EBCDIC encoding.
  511.         
  512.         - JNT Mail Networks: A number of X.25 networks, particularly
  513.           those associated with the UK Academic Community, use the JNT
  514.           (Joint Network Team) Mail Protocol, also known as Greybook.
  515.     
  516.     RFC 822 is based on the assumption that there is an underlying
  517.     service, which in RFC 1327 is called the 822-MTS service. The 822-
  518.     MTS service provides three basic functions:
  519.         
  520.         1. Identification of a list of recipients.
  521.         2. Identification of an error return address.
  522.         3. Transfer of an RFC 822 message.
  523.     
  524.     It is possible to achieve 2) within the RFC 822 header.  Some 822-
  525.     MTS protocols, in particular SMTP, can provide additional
  526.     functionality, but as these are neither mandatory in SMTP, nor
  527.     available in other 822-MTS protocols, they are not considered
  528.     here. Details of aspects specific to two 822-MTS protocols are
  529.  
  530.  
  531. Houttuin               Expires November 1993                 [Page 9]
  532.  
  533. Internet-Draft   X.400 - Internet mail gatewaying tutorial   May 1993
  534.  
  535.  
  536.     given in Appendices B and C of RFC 1327. An RFC 822 message
  537.     consists of a header, and content which is uninterpreted ASCII
  538.     text. The header is divided into fields, which are the protocol
  539.     elements. Most of these fields are analogous to P2 heading fields,
  540.     although some are analogous to MTS Service Elements.
  541.  
  542.  
  543. 1.4. What is RFC 1327
  544.  
  545.     
  546.     There is a large community using RFC 822 based protocols for mail
  547.     services, who will wish to communicate with users of the
  548.     InterPersonal Messaging Service (IPMS) provided by X.400 systems,
  549.     and the other way around. This will also be a requirement in cases
  550.     where RFC 822 communities intend to make a transition to use
  551.     X.400, as conversion will be needed to ensure a smooth service
  552.     transition.
  553.     
  554.     The basic function of a mail gateway can be described as follows:
  555.     receive take a mail from one mail world, translate it into the
  556.     formats of the other mail world and sends it out again using the
  557.     routing rules and protocols of that other world.
  558.     
  559.     Especially if a message crosses more than one gateway, it is
  560.     important that all gateways have the same understanding of how
  561.     things should be mapped. A simple example of what could go wrong
  562.     otherwise is the following: A sends a message to B through a
  563.     gateway and B's reply to A is being routed through another
  564.     gateway. If the two gateways don't use the same mappings, it can
  565.     be expected that the From and To addresses in the original mail
  566.     and in the answer don't match, which is, to say the least, very
  567.     confusing for the end-users (consider what happens if automated
  568.     processes communicate per mail). More serious things can happen to
  569.     addresses if a message crosses more than one gateway on its way
  570.     from the originator to the recipient. As a real-life example,
  571.     consider receiving a mail from:
  572.     
  573.     Mary Plork <MMP_+a_ARG_+lMary_Plork+r%MHS+d_A0CD8A2B01F54FDC-
  574.     A0CB9A2B03F53FDC%ARG_Incorporated@argmail.com>
  575.     
  576.     Not what you would call user-friendly addressing.... RFC 1327
  577.     describes a set of mappings that will enable a more transparent
  578.     interworking between systems operating X.400(both 84 and 88) and
  579.     systems using RFC 822, or protocols derived from RFC 822.
  580.     
  581.     RFC 1327 describes all mappings in term of X.400(88). It defines
  582.     how these mappings should be applied to X.400(84) systems in its
  583.     Appendix G.
  584.     
  585.     Some words about the history of RFC 1327: It started out in June
  586.     1986, when RFC 987 defined for X.400(84) what RFC 1327 defines for
  587.     X.400(84 and 88). RFC 1026 added a number of additions and
  588.  
  589.  
  590. Houttuin               Expires November 1993                [Page 10]
  591.  
  592. Internet-Draft   X.400 - Internet mail gatewaying tutorial   May 1993
  593.  
  594.  
  595.     corrections to RFC 987. In December 1989, RFC 1138, which had a
  596.     very short lifetime, was the first one to deal with X.400(88). It
  597.     was obsoleted by RFC 1148 in March 1990. Finally, in May 1992, RFC
  598.     1327 obsoleted all of its ancestors.
  599.  
  600.  
  601. 1.5. RFC 822 versus X.400
  602.  
  603.     
  604.     Before describing RFC 1327 in more detail, it is useful to quickly
  605.     compare RFC 822 with X.400:
  606.     
  607.     RFC 822 has got:
  608.         
  609.         - Simplicity
  610.         - Wide acceptance
  611.         - Large user base
  612.         - Public domain and commercial implementations
  613.         - Public domain and commercial user interfaces
  614.         - History
  615.     
  616.     X.400 has got:
  617.         
  618.         - Acceptance in the standards communities
  619.         - Commercial vendors of service
  620.         - Defined ways to transfer things other than ASCII text (but
  621.           only a few implementations have implemented it)
  622.         - Standard notifications of delivery to user's mailbox and
  623.           notification of a message being read by the user (these ones
  624.           are often implemented, too!)
  625.         - Future
  626.  
  627.  
  628. 2. What must be mapped
  629.  
  630.     
  631.     Both RFC 822 and X.400 messages consist of certain service
  632.     elements (such as 'originator', 'subject'). As long as a message
  633.     stays within its own world, the behaviour of such service elements
  634.     is well defined. An important goal for a gateway is to provide the
  635.     highest possible service level when a message crosses the boundary
  636.     between the two mail worlds.
  637.     
  638.     RFC 1327 defines mappings between the different service elements.
  639.     Some of these mappings are quite straight-forward, such as
  640.     '822.Subject:' <-> 'IPMS.Subject' (IPMS = Inter-Personal Messaging
  641.     Service), but there are also more complicated cases. Especially
  642.     when certain service elements exist only in one of the two worlds
  643.     (e.g. interpersonal notifications), or when service elements exist
  644.     in both worlds, but with slightly different interpretations, some
  645.     tricks may be needed to provide the service over the gateway
  646.     border.
  647.  
  648.  
  649. Houttuin               Expires November 1993                [Page 11]
  650.  
  651. Internet-Draft   X.400 - Internet mail gatewaying tutorial   May 1993
  652.  
  653.  
  654.     
  655.     Apart from mapping between the service elements, a gateway must
  656.     also map the types and values assigned to these service elements.
  657.     Again, this may in certain cases be very simple, e.g. 'IA5 ->
  658.     ASCII'. The most complicated example is mapping address spaces.
  659.     The problem is that address spaces are not something static that
  660.     can be defined within RFC 1327. Address spaces change
  661.     continuously, and they are defined by certain addressing
  662.     authorities, which are not always parallel in the RFC 822 and the
  663.     X.400 world. A valid mapping between two addresses assumes however
  664.     that there is 'administrative equivalence' between the two domains
  665.     in which the addresses are (see also [MSG-93]).
  666.     
  667.     The following basic mappings are defined in RFC 1327. When going
  668.     from RFC 822 to X.400, an RFC 822 message and the associated 822-
  669.     MTS information is always mapped into an IPM (MTA, MTS, and IPMS
  670.     Services). Going from X.400 to RFC 822, an RFC 822 message and the
  671.     associated 822-MTS information may be derived from:
  672.         
  673.         - A Report (MTA, and MTS Services)
  674.         
  675.         - An InterPersonal Notification (IPN) (MTA, MTS, and IPMS
  676.           services)
  677.         
  678.         - An InterPersonal Message (IPM) (MTA, MTS, and IPMS services)
  679.     
  680.     Probes (MTA Service) have no equivalent in RFC 821 or RFC 822 and
  681.     are thus handled by the gateway. The gateways Probe confirmation
  682.     should be interpreted as if the gateway were the final MTA to
  683.     which the Probe was sent. Optionally, if the gateway uses RFC 821
  684.     as an 822-MTS, it may use the results of the 'VRFY' command to
  685.     test whether it would be able to deliver (or forward) mail to the
  686.     mailbox under probe.
  687.     
  688.     MTS Messages containing Content Types other than those defined by
  689.     the IPMS are not mapped by the gateway, and should be rejected at
  690.     the gateway.
  691.     
  692.     Some basic examples of mappings between service elements are
  693.     listed below.
  694.     
  695.     Service elements:
  696.          
  697.          RFC 822         X.400
  698.          ------------------------------------------------
  699.          Reply-To:       IPMS.Heading.reply-recipients
  700.          Subject:        IPMS.Heading.subject
  701.          In-Reply-To:    IPMS.Heading.replied-to-ipm
  702.          References:     IPMS.Heading.related-IPMs
  703.          To:             IPMS.Heading.primary-recipients
  704.          Cc:             IPMS.Heading.copy-recipients
  705.     
  706.  
  707.  
  708. Houttuin               Expires November 1993                [Page 12]
  709.  
  710. Internet-Draft   X.400 - Internet mail gatewaying tutorial   May 1993
  711.  
  712.  
  713.     Service element types:
  714.          
  715.          RFC 822         X.400
  716.          ------------------------------------------------
  717.          ASCII           PrintableString
  718.          Boolean         Boolean
  719.     
  720.     Service element values:
  721.          
  722.          RFC 822         X.400
  723.          ------------------------------------------------
  724.          oh_dear         oh(u)dear
  725.          False           00000000
  726.     
  727.     There are some mappings between service elements that are rather
  728.     tricky and enough important to mention in this tutorial. These are
  729.     the mappings of origination-related headers and some envelope
  730.     fields:
  731.     
  732.     RFC 822 -> X.400:
  733.         
  734.         - If Sender: is present, Sender: is mapped to
  735.           IPMS.Heading.originator, and From: is mapped to
  736.           IPMS.Heading.authorizing-users. If not, From: is mapped to
  737.           IPMS.Heading.originator.
  738.     
  739.     X.400 -> RFC 822
  740.         
  741.         - If IPMS.Heading.authorizing-users is present,
  742.           IPMS.Heading.originator is mapped to Sender:, and
  743.           IPMS.Heading.authorizing-users is mapped to From: . If not,
  744.           IPMS.Heading.originator is mapped to "From:".
  745.     
  746.     Envelope attributes
  747.         
  748.         - RFC 1327 doesn't define how to map the MTS.OriginatorName
  749.           and the MTS.RecipientName (often referred to as the
  750.           P1.originator and P1.recipient), since this depends on which
  751.           underlying 822-MTS is used. In the very common case that RFC
  752.           821 (SMTP) is used for this purpose, the mapping is normally
  753.           as follows:
  754.             
  755.             MTS.Originator-name <->   MAIL FROM:
  756.             MTS.Recipient-name  <->   RCPT TO:
  757.         
  758.           This explains why there are no mapped equivalents for those
  759.           envelope attributes visible in the heading of an RFC 822
  760.           message.
  761.     
  762.     For more details, refer to RFC 1327, chapters 2.2 and 2.3.
  763.  
  764.  
  765.  
  766.  
  767. Houttuin               Expires November 1993                [Page 13]
  768.  
  769. Internet-Draft   X.400 - Internet mail gatewaying tutorial   May 1993
  770.  
  771.  
  772. 3. Address mapping
  773.  
  774.     
  775.     As address mapping is often considered the most complicated part
  776.     of mapping between service element values, this subject is given a
  777.     separate chapter.
  778.     
  779.     Both RFC 822 and X.400 have their own specific address formats.
  780.     RFC 822 addresses are text strings (e.g. "plork@tlec.nl"), whereas
  781.     X.400 addresses are binary (ASN.1) encoded sets of attributes with
  782.     values. Such binary addresses can be made readable for a human
  783.     user by a number of notations; for instance:
  784.         
  785.         C=zz
  786.         ADMD=ade
  787.         PRMD=fhbo
  788.         O=a bank
  789.         S=plork
  790.         G=mary
  791.     
  792.     The rest of this chapter deals with addressing issues and mappings
  793.     between the two address forms in more detail.
  794.  
  795.  
  796. 3.1. X.400 addresses
  797.  
  798.     
  799.     As already stated above, an X.400 address is modelled as a set of
  800.     attributes. Some of these attributes are mandatory, others are
  801.     optional. Each attribute has a type and a value, e.g. the Surname
  802.     attribute has type IA5text, and an instance of this attribute
  803.     could have the value 'Kille'. Attributes are divided in Standard
  804.     Attributes (SAs) and Domain Defined Attributes (DDAs).
  805.     
  806.     X.400 defines four basic forms of addresses ([X.402(88), 18.5), of
  807.     which the 'Mnemonic O/R Address' is the form that is most used,
  808.     and is the only form that is dealt with in this tutorial. This is
  809.     roughly the same address format as what in the 84 version was
  810.     known as 'O/R names: form 1, variant 1' ([X.400(84)] 3.3.2).
  811.  
  812.  
  813. Standard Attributes
  814.  
  815.     
  816.     Standard Attributes (SAs) are attributes that all X.400
  817.     installations are supposed to 'understand' (i.e. use for routing),
  818.     for example: 'country name', 'given name' or 'organizational
  819.     unit'. The most commonly used SAs in X.400(84) are:
  820.         
  821.  
  822.  
  823.  
  824.  
  825.  
  826. Houttuin               Expires November 1993                [Page 14]
  827.  
  828. Internet-Draft   X.400 - Internet mail gatewaying tutorial   May 1993
  829.  
  830.  
  831.         surName (S)
  832.         givenName (G)
  833.         initials (I*)
  834.         generationQualifyer (GQ)
  835.         OrganizationalUnits (OU*)
  836.         OrganizationName (O)
  837.         PrivateDomainName (PRMD)
  838.         AdministrationDomainName (ADMD)
  839.         CountryName (C)
  840.     
  841.     The combination of S, G, I* and GQ is often referred to as the
  842.     PersonalName (PN).
  843.     
  844.     Although there is no hierarchy (of addressing authorities) defined
  845.     by the standards, the following hierarchy is considered natural:
  846.         
  847.         PersonalName < OU < OU <...< O < P < A < C
  848.     
  849.     In addition to the SAs listed above, X.400(88) defines some extra
  850.     attributes, the most important of which is
  851.         
  852.         Common Name (CN)
  853.     
  854.     CN can be used instead of or even together with PN. The problem in
  855.     X.400(84) was that PN (S G I* GQ) was well suited to represent
  856.     persons, but not roles and abstract objects, such as distribution
  857.     lists. Even though postmaster clearly is a role, not someone's
  858.     real surname, it is quite usual in X.400(84) to address a
  859.     postmaster with S=postmaster. In X.400(88), the same postmaster
  860.     would be addressed with CN=postmaster .
  861.     
  862.     The attributes C and ADMD are mandatory (to be present), and may
  863.     not be empty. At least one of the attributes PRMD, O, OU, PN and
  864.     CN must be present.
  865.     
  866.     PRMD and ADMD are often felt to be routing attributes that don't
  867.     really belong in addresses. As an example of how such address
  868.     attributes can be used for the purpose of routing, consider two
  869.     special values for ADMD:
  870.         
  871.         - ADMD=0; (zero) should be interpreted as 'the PRMD in this
  872.           address is not connected to any ADMD'
  873.         
  874.         - ADMD= ; (single SPACE) should be interpreted as 'the PRMD in
  875.           this address is reachable via any ADMD in this country'. It
  876.           is expected that ISO will express this 'any' value by means
  877.           of a missing ADMD attribute in future versions of MOTIS.
  878.           This representation can uniquely identify the meaning 'any',
  879.           as a missing or empty ADMD field as such is not allowed.
  880.     
  881.     Addresses are defined in X.400 using the Abstract Syntax Notation
  882.     One (ASN.1). X.409 defines how definitions in ASN.1 should be
  883.  
  884.  
  885. Houttuin               Expires November 1993                [Page 15]
  886.  
  887. Internet-Draft   X.400 - Internet mail gatewaying tutorial   May 1993
  888.  
  889.  
  890.     encoded into binary format. Note that the meaning, and thus the
  891.     ASN.1 encoding, of a missing attribute is not the same as that of
  892.     an empty attribute. In addressing, this difference is often
  893.     represented as follows:
  894.         
  895.         - PRMD=; means that this attribute is present in the address,
  896.           but its value is empty. Since this is not very useful, it's
  897.           hardly ever being used. The only examples the author knows
  898.           of were caused by mail managers who should have had this
  899.           tutorial before they started defining their addresses :-)
  900.         
  901.         - PRMD=@; means that this attribute is not present in the
  902.           address.
  903.           {NB. This is only necessary if an address notation (see
  904.           below) requires that every single attribute in the hierarchy
  905.           is somehow listed. Otherwise, a missing attribute can of
  906.           course be represented by simply not mentioning it. This
  907.           means that this syntax is mostly used in mapping rules, not
  908.           by end users.}
  909.     
  910.     Addresses that only contain SAs are often referred to as Standard
  911.     Attribute Addresses (SAAs).
  912.  
  913.  
  914. Domain Defined Attributes
  915.  
  916.     
  917.     Domain Defined Attributes (DDAs) were meant to have a meaning only
  918.     within a certain context (originally this was intended to be the
  919.     context of a certain management domain), such as a company context
  920.     (for example: DDA type=internal-phone-nr value=9571). Such DDAs
  921.     are often used along with the PN or CN attributes.
  922.     
  923.     A bit tricky is the use of DDAs to encode service element types or
  924.     values that are only available on one side of a service gateway.
  925.     The most important examples of such usage are:
  926.        
  927.        RFC 1327 (e.g. DDA type=RFC-822 value=u(u)ser(a)isode.com)
  928.        
  929.        RFC 1328 ;(e.g. DDA type=CommonName value=mhs-discussion-list)
  930.     
  931.     The RFC 1327 example will get more than enough attention later on
  932.     in this tutorial. As for the second example: RFC 1328 defines the
  933.     downgrading from X.400(88) to X.400(84), and the DDA of type
  934.     CommonName is a straightforward trick to represent the attribute
  935.     CN in an X.400(84) address.
  936.     
  937.     In the context of RFC 1327 and RFC 1328, DDAs are normally used
  938.     _instead of_ PN and CN, whose equivalents are implicitly encoded
  939.     within the DDA (localpart=u_ser; CN=mhs-discussion-list).
  940.     
  941.  
  942.  
  943.  
  944. Houttuin               Expires November 1993                [Page 16]
  945.  
  946. Internet-Draft   X.400 - Internet mail gatewaying tutorial   May 1993
  947.  
  948.  
  949.     Addresses that contain both SAs and DDAs are often referred to as
  950.     DDA addresses.
  951.  
  952.  
  953. X.400 address notation
  954.  
  955.     
  956.     X.400 only prescribes the binary encoding of addresses, it doesn't
  957.     standardise how such addresses should be written on paper or what
  958.     they should look like in a user interface on a computer screen.
  959.     There exist a number of recommendations for X.400 address
  960.     representation though.
  961.   
  962.   - JTC proposes an annex to CCITT Rec. F.401 and ISO/IEC 10021-2,
  963.     called 'representation of o/r addresses for human usage'.
  964.     According to this proposal, an X.400 address would look as
  965.     follows:
  966.   
  967.     G=jo; S=plork; O=a bank; OU1=owe; OU2=you; P=fhbo; A=ade; C=zz
  968.     
  969.     Note that in this format, the hierarchy of O and OUs is exactly
  970.     the opposite of what one would expect intuitively (the hierarchy
  971.     is increasing from left to right, except for the O and OUs, where
  972.     it's right to left).
  973.   
  974.   - Following what was originally used in the DFN-EAN software, most
  975.     EAN versions today use an address representation similar to the
  976.     JTC proposal, with a few differences:
  977.             
  978.             - natural ordering for O and OUs
  979.             - no numbering of OUs.
  980.             - allows writing ADMD and PRMD instead of A and P
  981.   
  982.     The address in the example above could, in EAN, be represented as:
  983.   
  984.     G=jo; S=plork; OU=you; OU=owe; O=a bank; P=fhbo; A=ade; C=zz
  985.   
  986.     This DFN-EAN format is still often referred to as _the_ 'readable
  987.     format'.
  988.   
  989.   - The RARE Working Group on Mail and Messaging, WG-MSG, has made a
  990.     recommendation that is very similar to the DFN-EAN format, but
  991.     with the hierarchy reversed. Further ADMD and PRMD are used
  992.     instead of A and P. This results in the address above to be
  993.     represented as:
  994.   
  995.     C=zz; ADMD=ade; PRMD=fhbo; O=a bank; OU=owe; OU=you; S=plork; G=jo
  996.     
  997.     This format is recognised by most versions of the EAN software. In
  998.     the R&D community, this is also the prevalent address
  999.     representation for business cards, letter heads, etc. This is also
  1000.     the format that will be used for the examples in this tutorial.
  1001.  
  1002.  
  1003. Houttuin               Expires November 1993                [Page 17]
  1004.  
  1005. Internet-Draft   X.400 - Internet mail gatewaying tutorial   May 1993
  1006.  
  1007.  
  1008.   
  1009.   - RFC 1327 defines a slash separated address representation:
  1010.   
  1011.     /G=jo/S=plork/OU=you/OU=owe/O=a bank/P=fhbo/A=ade/C=zz/
  1012.     
  1013.     Not only is this format used by the PP software, it is also
  1014.     widespread for business cards and letter heads in the R&D
  1015.     community.
  1016.   
  1017.   - RFC 1327 finally defines yet another format for X.400 _domains_
  1018.     (not for human users):
  1019.   
  1020.     OU$you.OU$owe.O$a bank.P$fhbo.A$ade.C$zz
  1021.     
  1022.     the main advantage of this format is that it is better machine-
  1023.     parseble than the others. This immediately implies its main
  1024.     disadvantage: it is barely readable for humans. Every attribute
  1025.     within the hierarchy should be listed, thus a missing attribute
  1026.     must be represented by the '@' sign (e.g. $a bank.P$@.A$ade.C$zz).
  1027.   
  1028.   - Paul-Andr Pays (INRIA) has proposed a format that combines the
  1029.     readability of the JTC format with the parsebility of the RFC 1327
  1030.     domain format. Although a number of operational tools within the
  1031.     GO-MHS community are already based on (variants of) this proposal,
  1032.     its future is still uncertain.
  1033.  
  1034.  
  1035. 3.2. RFC 822 addresses
  1036.  
  1037.     
  1038.     An RFC 822 address takes the form of an ASCII string of the
  1039.     following form:
  1040.         
  1041.         localpart@domainpart
  1042.     
  1043.     "domainpart" is sub-divided into
  1044.     
  1045.     domainpart = sdom(n).sdom(n-1)....sdom(2).sdom(1).dom
  1046.     
  1047.     "sdom" stands for "subdomain", "dom" stands for "top-level-
  1048.     domain".
  1049.     
  1050.     "localpart" ;is normally a login name, and thus typically is a
  1051.     surname or an abbreviation for this. It can also be the address of
  1052.     a local distribution list or an alias that will allow redirecting
  1053.     mail (e.g. mary.plork@tlec.nl might be an alias for
  1054.     plork@tlec.nl). The localpart in the latter address may again be a
  1055.     surname alias for Mary's login name pl, so that the mail will
  1056.     eventually be delivered to pl@tlec.nl)
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062. Houttuin               Expires November 1993                [Page 18]
  1063.  
  1064. Internet-Draft   X.400 - Internet mail gatewaying tutorial   May 1993
  1065.  
  1066.  
  1067.     
  1068.     The hierarchy (of addressing authorities) in an RFC 822 address is
  1069.     as follows:
  1070.         
  1071.         localpart < sdom(n) < sdom(n-1) <...< dom
  1072.     
  1073.     Some virtual real-life examples:
  1074.         
  1075.         joemp@tlec.nl
  1076.         tsjaka.kahn@walhalla.diku.dk
  1077.         a13_vk@cs.rochester.edu
  1078.     
  1079.     In the above examples, 'nl', 'dk', and 'edu' are valid,
  1080.     registered, top level domains. Note that some networks that
  1081.     have their own addressing schemes are also reachable by way of
  1082.     'RFC 822-like' addressing. Consider the following addresses:
  1083.         
  1084.         oops!user          (a UUCP address)
  1085.         V13ENZACC@CZKETH5A (a BITNET address)
  1086.     
  1087.     These addresses can be expressed in RFC 822 format:
  1088.         
  1089.         user@oops.uucp
  1090.         V13ENZACC@CZKETH5A.BITNET
  1091.     
  1092.     Although the domains '.uucp', '.bitnet', and '.earn' are not
  1093.     officially registered, they are used in the Internet to express
  1094.     that the mail should be routed to a gateway.
  1095.     
  1096.     As for mapping such addresses to X.400, there is no direct mapping
  1097.     defined between X.400 on the one hand and UUCP and BITNET on the
  1098.     other, so they are normally mapped to RFC 822 style first, and
  1099.     then to X.400 if needed.
  1100.  
  1101.  
  1102. 3.3. RFC 1327 address mapping
  1103.  
  1104.     
  1105.     Despite the difference in address formats, the address spaces
  1106.     defined by RFC 822 and X.400 are quite similar. The most important
  1107.     parallels are:
  1108.         
  1109.         - both address spaces are hierarchical
  1110.         - top level domains and country codes are often the same
  1111.         - localparts and surnames are often the same
  1112.     
  1113.     This similarity can of course be exploited in address mapping
  1114.     algorithms. This is also done in RFC 1327 (NB only in the
  1115.     exception mapping algorithm. See chapter 3.3.2).
  1116.     
  1117.     Note that the actual mapping algorithm is much more complicated
  1118.     than shown below. For details, see RFC 1327, chapter 4.
  1119.  
  1120.  
  1121. Houttuin               Expires November 1993                [Page 19]
  1122.  
  1123. Internet-Draft   X.400 - Internet mail gatewaying tutorial   May 1993
  1124.  
  1125.  
  1126.  
  1127.  
  1128. 3.3.1. Default mapping
  1129.  
  1130.     
  1131.     The default RFC 1327 address mapping can be visualised as a
  1132.     function with input and output parameters:
  1133.         
  1134.         
  1135.           address information of the gateway performing the mapping
  1136.                                       |
  1137.                                       v
  1138.                              +-----------------+
  1139.         RFC 822 address <--->| address mapping | <---> X.400 address
  1140.                              +-----------------+
  1141.     
  1142.     I.e. to map an address from X.400 to RFC 822 or vice versa, the
  1143.     only extra input needed is the address information of the local
  1144.     gateway.
  1145.  
  1146.  
  1147. 3.3.1.1. X.400 -> RFC 822
  1148.  
  1149.     
  1150.     There are two kinds of default address mapping from X.400 to RFC
  1151.     822: one to map a real X.400 address to RFC 822, and another to
  1152.     decode an RFC 822 address that was mapped to X.400 (i.e. to
  1153.     reverse the default RFC 822 -> X.400 mapping).
  1154.     
  1155.     To map a real X.400 address to RFC 822, the slash separated
  1156.     notation of the X.400 address (see chapter 3.1.) is mapped to
  1157.     'localpart', and the local RFC 822 domain of the gateway that
  1158.     performs the mapping is used as the domain part. As an example,
  1159.     the gateway 'gw.switch.ch' would perform the following mappings:
  1160.         
  1161.         C=zz; ADMD=ade; PRMD=fhbo; O=tlec; S=plork; ->
  1162.         /C=zz/ADMD=ade/PRMD=fhbo/O=tlec/S=plork/@gw.switch.ch
  1163.         
  1164.         C=zz; ADMD=ade; PRMD=fhbo; O=a bank; S=plork->
  1165.         "/C=zz/ADMD=ade/PRMD=fhbo/O=a bank/S=plork/"@gw.switch.ch
  1166.     
  1167.     The quotes in the second example are mandatory if the X.400
  1168.     address contains spaces, otherwise the syntax rules for the RFC
  1169.     822 localpart would be violated.
  1170.     
  1171.     This default mapping algorithm is generally referred to as 'left-
  1172.     hand-side encoding'.
  1173.     
  1174.     To reverse the default RFC 822 -> X.400 mapping (see chapter
  1175.     3.3.1.2): if the X.400 address contains a DDA of the type RFC-822,
  1176.     the SAs can be discarded, and the value of this DDA is the desired
  1177.     RFC 822 address (NB. Some characters in the DDA value must be
  1178.  
  1179.  
  1180. Houttuin               Expires November 1993                [Page 20]
  1181.  
  1182. Internet-Draft   X.400 - Internet mail gatewaying tutorial   May 1993
  1183.  
  1184.  
  1185.     decoded first. See chapter 3.3.1.2.). For example, the gateway
  1186.     'GW.tlec.nl' would perform the following mapping:
  1187.         
  1188.         DD.RFC-822=bush(a)dole.us; C=nl; ADMD=tlec; PRMD=GW
  1189.         ->
  1190.         bush@dole.us
  1191.  
  1192.  
  1193. 3.3.1.2. RFC 822 -> X.400
  1194.  
  1195.     
  1196.     There are also two kinds of default address mapping from RFC 822
  1197.     to X.400: one to map a real RFC 822 address to X.400, and another
  1198.     to decode an X.400 address that was mapped to RFC 822 (i.e. to
  1199.     reverse the default X.400 -> RFC 822 mapping).
  1200.     
  1201.     To map a real RFC 822 address to X.400, the RFC 822 address is
  1202.     encoded in a DDA of type RFC-822 , and the SAs of the local
  1203.     gateway performing the mapping are added to form the complete
  1204.     X.400 address. This mapping is generally referred to as 'DDA
  1205.     mapping'. As an example, the gateway 'C=nl; ADMD=tlec; PRMD=GW'
  1206.     would perform the following mapping:
  1207.         
  1208.         bush@dole.us  ->
  1209.         DD.RFC-822=bush(a)dole.us; C=nl; ADMD=tlec; PRMD=GW
  1210.     
  1211.     As for the encoding/decoding of RFC 822 addresses in DDAs, it is
  1212.     noted that RFC 822 addresses may contain characters (@ ! % etc.)
  1213.     that cannot directly be represented in a DDA. DDAs are of the (not
  1214.     so rich) type 'PrintableString', so these special characters need
  1215.     a special encoding. For details, refer to RFC 1327, chapter 3.4.
  1216.     Some examples:
  1217.         
  1218.         100%name@address    ->    DD.RFC-822;=100(p)name(a)address
  1219.         u_ser!name@address  ->    DD.RFC-822;=u(u)ser(b)(a)address
  1220.     
  1221.     To decode an X.400 address that was mapped to RFC 822: if the RFC
  1222.     822 address has a slash separated representation of a complete
  1223.     X.400 mnemonic O/R address in its localpart, that address is the
  1224.     result of the mapping. As an example, the gateway 'gw.switch.ch'
  1225.     would perform the following mapping:
  1226.         
  1227.         /C=zz/ADMD=ade/PRMD=fhbo/O=tlec/S=plork/G=mary/@gw.switch.ch
  1228.         ->
  1229.         C=zz; ADMD=ade; PRMD=fhbo; O=tlec; S=plork; G=mary
  1230.  
  1231.  
  1232. 3.3.2. Exception mapping according to mapping tables
  1233.  
  1234.     
  1235.     Chapter 3.3.1. showed that it is theoretically possible to use RFC
  1236.     1327 with default mapping only. Although this provides a very
  1237.  
  1238.  
  1239. Houttuin               Expires November 1993                [Page 21]
  1240.  
  1241. Internet-Draft   X.400 - Internet mail gatewaying tutorial   May 1993
  1242.  
  1243.  
  1244.     simple, straightforward, way to map addresses, there are quite
  1245.     some good reasons not to use RFC 1327 this way:
  1246.         
  1247.         - RFC 822 users are used to writing simple addresses of  the
  1248.           form 'localpart@domainpart'. They often consider X.400
  1249.           addresses, and thus also the left-hand-side encoded
  1250.           equivalents, as unnecessarily long and complicated. They
  1251.           would rather be able to address an X.400 user as if she had
  1252.           a 'normal' RFC 822 address. For example take the mapping
  1253.             
  1254.             C=zz; ADMD=ade; PRMD=fhbo; O=tlec; S=plork;     ->
  1255.             /C=zz/ADMD=ade/PRMD=fhbo/O=tlec/S=plork/@gw.switch.ch
  1256.         
  1257.           from chapter 3.3.1.1. RFC 822 users would find it much more
  1258.           'natural' if this address could be expressed in RFC 822 as:
  1259.             
  1260.             plork@tlec.fhbo.ade.nl
  1261.         
  1262.         - X.400 users are used to using X.400 addresses with SAs only.
  1263.           They often consider DDA addresses as complicated, especially
  1264.           if they have to encode the special characters, @ % ! etc,
  1265.           manually. They would rather be able to address an RFC 822
  1266.           user as if he had a 'normal' X.400 address. For example take
  1267.           the mapping
  1268.             
  1269.             bush@dole.us
  1270.             ->
  1271.             DD.RFC-822=bush(a)dole.us;
  1272.             C=nl; ADMD= ; PRMD=tlec; O=gateway
  1273.         
  1274.           from chapter 3.3.1.2. X.400 users would find it much more
  1275.           'natural' if this address could be expressed in X.400 as:
  1276.             
  1277.             C=us; ADMD=dole; S=bush
  1278.         
  1279.         - Many organisations are using both RFC 822 and X.400
  1280.           internally, and still want all their users to have a simple,
  1281.           unique address in both mail worlds. Note that in the default
  1282.           mapping, the mapped form of an address completely depends on
  1283.           which gateway  performed the mapping. This also results in a
  1284.           complication of more technical nature:
  1285.         
  1286.         - The tricky 'third party problem'. This problem must not
  1287.           necessarily be understood to read the rest of this chapter.
  1288.           If it looks too complicated, please feel free to skip it
  1289.           until you are more familiar with the basics.
  1290.         
  1291.           The third party problem is a routing problem caused by
  1292.           mapping. As an example for DDA mappings (the example holds
  1293.           just as well for left-hand-side encoding), consider the
  1294.           following situation (see Fig. 3.1.): RFC 822 user X in
  1295.  
  1296.  
  1297.  
  1298. Houttuin               Expires November 1993                [Page 22]
  1299.  
  1300. Internet-Draft   X.400 - Internet mail gatewaying tutorial   May 1993
  1301.  
  1302.  
  1303.           country A sends a message to two recipients: RFC 822 user Y,
  1304.           and X.400 user Z, both in country B:
  1305.             
  1306.             From: X@A
  1307.             To:   Y@B
  1308.                   /C=B/.../S=Z/@GW.A
  1309.         
  1310.           Since the gateway in country A maps all addresses in the
  1311.           message, Z will see both X's and Y's address as DDA-encoded
  1312.           RFC 822 addresses, with the SAs of the gateway in country A:
  1313.             
  1314.             From: DD.RFC-822=X(a)A; C=A;....;O=GW
  1315.             To:   DD.RFC-822=Y(a)B; C=A;....;O=GW
  1316.                   C=B;...;S=Z
  1317.             
  1318.             |       ------------         ---------
  1319.             |       |X: RFC 822|<------->|gateway|
  1320.             |       ------------         ---------
  1321.             | A           |                  ^
  1322.             \             |                  |
  1323.              \---------------------------------------------
  1324.                           |                  |
  1325.              /---------------------------------------------
  1326.             /             |                  |
  1327.             | B           |                  v
  1328.             |             |              -----------
  1329.             |             |              |Z: X.400 |
  1330.             |             |              -----------
  1331.             |             |                  .
  1332.             |             |                  .
  1333.             |             |                  .
  1334.             |             |                  .
  1335.             |             |                  .
  1336.             |             v                  v
  1337.             |        ------------         ---------
  1338.             |        |Y: RFC 822|<........|gateway|
  1339.             |        ------------         ---------
  1340.                                    
  1341.                    Fig. 3.1 The third party problem
  1342.                                    
  1343.         
  1344.           Now if Z wants to 'group reply' to both X and Y, his reply
  1345.           to Y will be routed over the gateway in country A, even
  1346.           though Y is located in the same country:
  1347.             
  1348.             From: C=B;...;S=Z
  1349.             To:   DD.RFC-822=Y(a)B; C=A;....;O=GW
  1350.                   DD.RFC-822=X(a)A; C=A;....;O=GW
  1351.  
  1352.  
  1353.  
  1354.  
  1355.  
  1356.  
  1357. Houttuin               Expires November 1993                [Page 23]
  1358.  
  1359. Internet-Draft   X.400 - Internet mail gatewaying tutorial   May 1993
  1360.  
  1361.  
  1362.         
  1363.           The best way to travel for a message from Z to Y would of
  1364.           course have been over the gateway in country B:
  1365.             
  1366.             From: C=B;...;S=Z
  1367.             To:   DD.RFC-822=Y(a)B; C=B;....;O=GW
  1368.                   DD.RFC-822=X(a)A; C=A;....;O=GW
  1369.         
  1370.           The third party problem is caused by the fact that local
  1371.           gateway address information is mapped into addresses.
  1372.         
  1373.           Ideally, the third party problem shouldn't exist. After all,
  1374.           address mapping affects addresses, and an address is not a
  1375.           route.... The reality is different however. For instance,
  1376.           very few X.400 products are capable to route messages on the
  1377.           contents of a DDA (actually, only RFC 1327 gateways will be
  1378.           able to interpret this type of DDA, and who says that the
  1379.           reply will pass a local gateway on its route back?). The
  1380.           same limitations hold for RFC 822 based mailers: most are
  1381.           not capable to make routing decisions on the content of a
  1382.           left-hand-side encoded X.400 address. So in practice,
  1383.           addressing (and thus also mapping) will very well affect
  1384.           routing.
  1385.     
  1386.     To make mapping between the addresses more user friendly, and to
  1387.     avoid the problems shown above, RFC 1327 allows for overruling the
  1388.     default left-hand-side encoding and DDA mapping algorithms. This
  1389.     is done by specifying associations (mapping rules) between certain
  1390.     domainparts and X.400 domains. An X.400 domain consists of the
  1391.     domain-related SAs of Mnemonic O/R address (i.e. All SAs except PN
  1392.     and CN). The idea is to use the similarities between both address
  1393.     spaces, and directly map similar address parts onto each other.
  1394.     If, for the domain in the address to be mapped, an explicit
  1395.     mapping rule can be found, the mapping is performed between:
  1396.         
  1397.         localpart     <->   PersonalName
  1398.         domainpart    <->   X.400 domain
  1399.     
  1400.     Only if no mapping rule can be found - i.e. the address mapping
  1401.     must fall back to its default algorithm - is the address
  1402.     information of the gateway performing the mapping used as an input
  1403.     parameter.
  1404.     
  1405.     The complete mapping function can thus be visualised as follows:
  1406.         
  1407.  
  1408.  
  1409.  
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415.  
  1416. Houttuin               Expires November 1993                [Page 24]
  1417.  
  1418. Internet-Draft   X.400 - Internet mail gatewaying tutorial   May 1993
  1419.  
  1420.  
  1421.         
  1422.           address information of the gateway performing the mapping
  1423.                                       |
  1424.                                       v
  1425.                              +-----------------+
  1426.         RFC 822 address <--->| address mapping | <---> X.400 address
  1427.                              +-----------------+
  1428.                                       ^
  1429.                                       |
  1430.                     domain associations (mapping rules)
  1431.  
  1432.  
  1433. 3.3.2.1. PersonalName and localpart mapping
  1434.  
  1435.     
  1436.     Since the mapping between these address parts is independent of
  1437.     the mapping rules that are used, and because it follows a simple,
  1438.     two-way algorithmic approach, this subject is discussed in a
  1439.     separate sub-chapter first.
  1440.     
  1441.     The X.400 PersonalName consists of givenName, initials, and
  1442.     surName. RFC 1327 assumes that generationQualifyer is not used.
  1443.     
  1444.     To map a localpart to an X.400 PN, the localpart is scanned for
  1445.     dots, which are considered delimiters between the components of
  1446.     PN, and also between single initials. In order not to put too much
  1447.     detail in this tutorial, only a few examples are shown here. For
  1448.     the detailed algorithm, see RFC 1327, chapter 4.2.1.
  1449.         
  1450.         Marshall.Rose             <->   G=Marshall;S=Rose
  1451.         M.T.Rose                  <->   I=MT;S=Rose
  1452.         Marshall.M.T.Rose         <->   G=Marshall;I=MT;S=Rose
  1453.     
  1454.     To map an X.400 PN to an RFC 822 localpart, take the non-empty PN
  1455.     attributes, put them into their hierarchical order (G I* S), and
  1456.     connect them with periods.
  1457.     
  1458.     Some exceptions are caused by the fact that left-hand-side
  1459.     encoding can also be mixed with exception mapping. This is shown
  1460.     in more detail in the following sub-chapters.
  1461.  
  1462.  
  1463. 3.3.2.2. Mapping between RFC 822 and X.400 domains
  1464.  
  1465.     
  1466.     A mapping rule associates two domains: an X.400 domain and an RFC
  1467.     822 domain. The X.400 domain is written in the RFC 1327 domain
  1468.     notation, so that both domains have the same hierarchical order.
  1469.     The domains are written on one line, separated by a '#' sign. For
  1470.     instance:
  1471.  
  1472.  
  1473.  
  1474.  
  1475. Houttuin               Expires November 1993                [Page 25]
  1476.  
  1477. Internet-Draft   X.400 - Internet mail gatewaying tutorial   May 1993
  1478.  
  1479.  
  1480.         
  1481.         arcom.ch#ADMD$arcom.C$ch#
  1482.         PRMD$tlec.ADMD$ade.C$nl#tlec.nl#
  1483.     
  1484.     A mapping rule must at least contain a top level domain and a
  1485.     country code. If an address must be mapped, a mapping rule with
  1486.     the longest domain match is sought. The associated domain in the
  1487.     mapping rule is used as the domain of the mapped address. The
  1488.     remaining domains are mapped one by one following the natural
  1489.     hierarchy. Concrete examples are shown in the following sub-
  1490.     chapters.
  1491.  
  1492.  
  1493. 3.3.2.2.1. X.400 -> RFC 822
  1494.  
  1495.     As an example, consider the mapping rule:
  1496.         
  1497.         PRMD$tlec.ADMD$ade.C$nl#tlec.nl#
  1498.     
  1499.     Then the address C=nl; ADMD=ade; PRMD=tlec; O=you; OU=owe; S=plork
  1500.         
  1501.         S      OU  O  PRMD  ADMD  Country
  1502.         |      |   |  |     |     |
  1503.         plork owe you tlec  ade   nl
  1504.     
  1505.     would be mapped as follows. The Surname 'plork' is mapped to the
  1506.     localpart 'plork', see chapter 3.3.2.1. The domain
  1507.     'PRMD$tlec.ADMD$ade.C$nl' is mapped according to the mapping rule:
  1508.         
  1509.         localpart
  1510.            |  sdom3
  1511.            |    | sdom2
  1512.            |    |   |  sdom1
  1513.            |    |   |   |  top-level-domain
  1514.            |    |   |   |   |
  1515.         plork@         tlec.nl
  1516.     
  1517.     The remaining SAs (O and one OU) are mapped one by one following
  1518.     the natural hierarchy: O is mapped to sdom2, OU is mapped to
  1519.     sdom3:
  1520.         
  1521.         localpart
  1522.            | sdom3
  1523.            |  | sdom2
  1524.            |  |   |  sdom1
  1525.            |  |   |   |  top-level-domain
  1526.            |  |   |   |    |
  1527.         plork@owe.you.tlec.nl
  1528.  
  1529.  
  1530.  
  1531.  
  1532.  
  1533.  
  1534. Houttuin               Expires November 1993                [Page 26]
  1535.  
  1536. Internet-Draft   X.400 - Internet mail gatewaying tutorial   May 1993
  1537.  
  1538.  
  1539.     
  1540.     Thus the mapped address is:
  1541.         
  1542.         plork@owe.you.tlec.nl
  1543.     
  1544.     The name of the file containing the listing of all such mapping
  1545.     rules, which is distributed to all gateways world-wide, is widely
  1546.     known under the following names:
  1547.         
  1548.         'or2rfc'
  1549.         'mapping 1'
  1550.         'mapping table 1'
  1551.         'map1'
  1552.         'table 1'
  1553.         'X2R'
  1554.     
  1555.     As already announced, there is an exceptional case were localpart
  1556.     and PN are not directly mapped onto each other: sometimes it is
  1557.     necessary to use the localpart for other purposes. If the X.400
  1558.     address contains attributes that would not allow for the simple
  1559.     mapping:
  1560.         
  1561.         localpart     <->   PersonalName
  1562.         domainpart    <->   X.400 domain
  1563.     
  1564.     (e.g. spaces are not allowed in an RFC 822 domain, GQ and CN
  1565.     cannot be directly mapped into localpart, DDAs of another type
  1566.     than RFC-822), such attributes, together with the PN, are left-
  1567.     hand-side encoded. The domainpart must still be mapped according
  1568.     to the mapping rule as far as possible. This probably needs some
  1569.     examples:
  1570.         
  1571.         C=nl; ADMD=ade; PRMD=tlec; O=owe; OU=you; S=plork; GQ=jr
  1572.         ->
  1573.         /S=plork/GQ=jr/@you.owe.tlec.nl
  1574.         
  1575.         C=nl; ADMD=ade; PRMD=tlec; O=owe; OU=spc ctr; OU=u; S=plork
  1576.         ->
  1577.         "/S=plork/OU=u/OU=spc ctr/"@owe.tlec.nl
  1578.     
  1579.     Note that in the second example, 'O=o' is still mapped to a
  1580.     subdomain following the natural hierarchy. The problems start with
  1581.     the space in 'OU=spc ctr'.
  1582.  
  1583.  
  1584. 3.3.2.2.2. RFC 822 -> X.400
  1585.  
  1586.     As an example, consider the mapping rule:
  1587.         
  1588.         tlec.nl#PRMD$tlec.ADMD$ade.C$nl#
  1589.  
  1590.  
  1591.  
  1592.  
  1593. Houttuin               Expires November 1993                [Page 27]
  1594.  
  1595. Internet-Draft   X.400 - Internet mail gatewaying tutorial   May 1993
  1596.  
  1597.  
  1598.     
  1599.     Then the address 'plork@owe.you.tlec.nl' :
  1600.         
  1601.         localpart
  1602.            |  sdom3
  1603.            |    | sdom2
  1604.            |    |   |  sdom1
  1605.            |    |   |   |  top-level-domain
  1606.            |    |   |   |   |
  1607.         plork@owe.you.tlec.nl
  1608.     
  1609.     would be mapped as follows.
  1610.     
  1611.     The localpart 'plork' is mapped to 'S=plork', see chapter 3.3.2.1.
  1612.     
  1613.     The domain 'tlec.nl' is mapped according to the mapping rule:
  1614.         
  1615.         S     OU  OU  O  PRMD  ADMD  Country
  1616.         |                |     |    |
  1617.         plork            tlec  ade  nl
  1618.     
  1619.     The remaining domains (owe.you) are mapped one by one following
  1620.     the natural hierarchy: sdom2 is mapped to O, sdom3 is mapped to
  1621.     OU:
  1622.         
  1623.         S     OU  OU  O  PRMD  ADMD  Country
  1624.         |         |   |  |     |     |
  1625.         plork     |   |  tlec  ade   nl
  1626.                   owe you
  1627.     
  1628.     Thus the mapped address is (in a readable notation):
  1629.         
  1630.         C=nl; ADMD=ade; PRMD=tlec; O=you; OU=owe; S=plork
  1631.     
  1632.     Had there been any left-hand-side encoded SAs in the localpart
  1633.     that didn't represent a complete mnemonic O/R address, the
  1634.     localpart would be mapped to those SAs. E.g.
  1635.         
  1636.         "/S=plork/GQ=jr/OU=u/OU=spc ctr/"@owe.tlec.nl
  1637.         ->
  1638.         C=nl; ADMD=ade; PRMD=tlec; O=owe; OU=space ctr;
  1639.         OU=u; S=plork; GQ=jr
  1640.     
  1641.     This is necessary to reverse the special use of localpart to left-
  1642.     hand-side encode certain attributes. See 3.3.2.2.1.
  1643.     
  1644.     You might ask yourself by now why such rules are needed at all.
  1645.     Why don't we just use map1 in the other direction? The problem is
  1646.     that a symmetric mapping function (a bijection) would indeed be
  1647.     ideal, but it's not feasible. Asymmetric mappings exist for a
  1648.     number of reasons:
  1649.  
  1650.  
  1651.  
  1652. Houttuin               Expires November 1993                [Page 28]
  1653.  
  1654. Internet-Draft   X.400 - Internet mail gatewaying tutorial   May 1993
  1655.  
  1656.  
  1657.         
  1658.         - To make sure that uucp addresses etc. get routed over local
  1659.           gateways.
  1660.         
  1661.         - Preferring certain address forms, while still not forbidding
  1662.           others to use another form. Examples of such reasons are:
  1663.             
  1664.             - Fading out old address forms.
  1665.             
  1666.             - If an RFC 822 address is mapped to ADMD= ; it means that
  1667.               the X.400 mail can be routed over any ADMD in that
  1668.               country. One single ADMD may of course send out an
  1669.               address containing: ADMD=ade; . It must also be possible
  1670.               to map such an address back.
  1671.     
  1672.     So we do need mapping rules from RFC 822 to X.400 too. The name of
  1673.     the file containing the listing of all such mapping rules, which
  1674.     is distributed to all gateways world-wide, is widely known under
  1675.     the following names:
  1676.         
  1677.         'rfc2or'
  1678.         'mapping 2'
  1679.         'mapping table 2'
  1680.         'map2'
  1681.         'table 2'
  1682.         'R2X'
  1683.     
  1684.     If the RFC 822 localpart and/or domainpart contain characters that
  1685.     would not immediately fit in the value of a PN attribute (! % _),
  1686.     the mapping algorithm falls back to DDA mapping. In this case, the
  1687.     SAs that will be used are still determined by mapping the
  1688.     domainpart according to the mapping rule. In our case:
  1689.         
  1690.         100%user@work.tlec.nl
  1691.         ->
  1692.         DD.RFC-822=100(p)user(a)address.tlec.nl;
  1693.         C=nl; ADMD=ade; PRMD=tlec; O=work
  1694.     
  1695.     If no map2 rule can be found, a third table of rules is scanned:
  1696.     the gateway table. This table has the same syntax as mapping table
  1697.     2, but its semantics are different. First of all, a domain that
  1698.     only has an entry in the gateway table is always mapped into an
  1699.     RFC 822 DDA. For a domain that is purely RFC 822 based, but whose
  1700.     mail may be relayed over an X.400 network, the gateway table
  1701.     associates with such a domain the SAs of the gateway to which the
  1702.     X.400 message should be routed. That gateway will then be
  1703.     responsible for gatewaying the message back into the RFC 822
  1704.     world. E.g. if we have the gateway table entry:
  1705.         
  1706.         gov#PRMD$gateway.ADMD$Internet.C$us#
  1707.  
  1708.  
  1709.  
  1710.  
  1711. Houttuin               Expires November 1993                [Page 29]
  1712.  
  1713. Internet-Draft   X.400 - Internet mail gatewaying tutorial   May 1993
  1714.  
  1715.  
  1716.     
  1717.     (and we assume that no overruling map2 rule for the top level
  1718.     domain 'gov' exists), this would force all gateways to perform the
  1719.     following mapping:
  1720.         
  1721.         bush@dole.gov
  1722.         ->
  1723.         DD.RFC-822=bush(a)dole.gov;
  1724.         C=us; ADMD=Internet; PRMD=gateway
  1725.     
  1726.     This is very similar to the default DDA mapping, except the SAs
  1727.     are those of a gateway that has declared to be responsible for a
  1728.     certain RFC 822 domain, not those of the local gateway. And thus,
  1729.     this mechanism helps avoid the third party problem discussed in
  1730.     chapter 3.2.2.
  1731.     
  1732.     The name of the table containing these gateway mapping rules,
  1733.     which is distributed to all gateways world-wide, is widely known
  1734.     under the following names:
  1735.         
  1736.         'rfc1148gate' {From the predecessor of RFC 1327, RFC 1148}
  1737.         'gate table'
  1738.         'gateway table'
  1739.         'GW'
  1740.  
  1741.  
  1742. 3.4. Table co-ordination
  1743.  
  1744.     
  1745.     As already stated, the use of mapping tables will only function
  1746.     smoothly if all gateways in the world use the same tables. On the
  1747.     global level, the collection and distribution of RFC 1327 address
  1748.     mapping tables is co-ordinated by the MHS Co-ordination Service:
  1749.        
  1750.        SWITCH Head Office
  1751.        MHS Co-ordination Service
  1752.        Limmatquai 138
  1753.        CH-8001 Zurich, Europe
  1754.        Tel. +41 1 261 8112
  1755.        Fax. +41 1 261 8133
  1756.        
  1757.        RFC 822: project-team@switch.ch
  1758.        X.400:   C=ch;ADMD=arcom;PRMD=switch;O=switch;S=project-team;
  1759.     
  1760.     The procedures for collection and distribution of mapping rules
  1761.     can be found on the MHS Co-ordination server, nic.switch.ch: in
  1762.     the directory /procedures . The server is available per FTP:
  1763.         
  1764.         username: cosine
  1765.         password: <your RFC 822 address>
  1766.  
  1767.  
  1768.  
  1769.  
  1770. Houttuin               Expires November 1993                [Page 30]
  1771.  
  1772. Internet-Draft   X.400 - Internet mail gatewaying tutorial   May 1993
  1773.  
  1774.  
  1775.     
  1776.     If you want to define mapping rules for your own local domain, you
  1777.     can find the right contact person in your country or network (the
  1778.     gateway manager) on the same server, in the directory /mhs-
  1779.     services .
  1780.  
  1781.  
  1782. 3.5. Local additions
  1783.  
  1784.     
  1785.     Since certain networks want to define rules that should only be
  1786.     used within their networks, such rules should not be distributed
  1787.     world-wide. Consider two networks that both want to reach the top-
  1788.     level-domain 'arpa' over their local gateway. They would both like
  1789.     to use a mapping 2 rule for this purpose:
  1790.         
  1791.         TLec in NL:     arpa#PRMD$gateway.ADMD$tlec.C$nl#
  1792.         
  1793.         SWITCH in CH:   arpa#PRMD$gateway.ADMD$switch.C$ch#
  1794.     
  1795.     (You may have noticed correctly that they should have defined such
  1796.     rules in the gateway table, but for the sake of the example, we
  1797.     assume they defined it in mapping table 2. This was the way things
  1798.     were done in the days of RFC 987, and many networks are still
  1799.     doing it this way these days.)
  1800.     
  1801.     Since a mapping table cannot contain two mapping rules with the
  1802.     same domain on the left hand side, such 'local mappings' are not
  1803.     distributed globally. There exists a RARE draft proposal ([MSG-
  1804.     93]) which defines a mechanism for allowing and automatically
  1805.     dealing with conflicting mapping rules, but this mechanism has not
  1806.     been implemented as to date. After having received the global
  1807.     mapping tables from the MHS Co-ordination Service, many networks
  1808.     add 'local' rules to map2 and the gateway table before installing
  1809.     them on their gateways. Note that the reverse mapping 2 rules for
  1810.     such local mappings _are_ globally unique, and can thus be
  1811.     distributed world-wide. This is even necessary, because addresses
  1812.     that were mapped with a local mapping rule may leak out to other
  1813.     networks (here comes the third party problem again...). Such other
  1814.     networks should at least be given the possibility to map the
  1815.     addresses back. So the global mapping table 1 would in this case
  1816.     contain the two rules:
  1817.         
  1818.         PRMD$gateway.ADMD$tlec.C$nl#arpa#
  1819.         PRMD$gateway.ADMD$switch.C$ch#arpa#
  1820.     
  1821.     Note that if such rules would have been defined as local gate
  1822.     table entries instead of gate2 entries, there would have been no
  1823.     need to distribute the reverse mappings world-wide (the reverse
  1824.     mapping of a DDA encoded RFC 822 address is simply done by
  1825.     stripping the SAs, see 3.3.1.1.).
  1826.  
  1827.  
  1828.  
  1829. Houttuin               Expires November 1993                [Page 31]
  1830.  
  1831. Internet-Draft   X.400 - Internet mail gatewaying tutorial   May 1993
  1832.  
  1833.  
  1834.  
  1835. 3.6. Product specific formats
  1836.  
  1837.     
  1838.     Not all software uses the RFC 1327 format of the mapping tables
  1839.     internally. Almost all formats allow comments on a line starting
  1840.     with a # sign. Some examples of different formats:
  1841.     
  1842.     RFC 1327
  1843.         
  1844.         # This is pure RFC 1327 format
  1845.         # table 1: X.400 -> RFC 822
  1846.         #
  1847.         PRMD$tlec.ADMD$ade.C$nl#tlec.nl#
  1848.         # etc.
  1849.         
  1850.         # table 2: RFC 822 -> X.400
  1851.         #
  1852.         arcom.ch#ADMD$arcom.C$ch#
  1853.         # etc.
  1854.     
  1855.     EAN
  1856.         
  1857.         # This is EAN format
  1858.         # It uses the readable format for X.400 domains and TABs
  1859.         # to make a 'readable mapping table format'.
  1860.         # table 1: X.400 -> RFC 822
  1861.         #
  1862.         P=tlec; A=ade; C=nl;       # tlec.nl
  1863.         # etc.
  1864.         
  1865.         # table 2: RFC 822 -> X.400
  1866.         #
  1867.         arcom.ch                   # A=arcom; C=ch;
  1868.         # etc.
  1869.     
  1870.     PP
  1871.         
  1872.         # This is PP format
  1873.         # table 1: X.400 -> RFC 822
  1874.         #
  1875.         PRMD$tlec.ADMD$ade.C$nl:tlec.nl
  1876.         # etc.
  1877.         
  1878.         # table 2: RFC 822 -> X.400
  1879.         #
  1880.         arcom.ch:ADMD$arcom.C$ch
  1881.         # etc.
  1882.     
  1883.     Most R&D networks have tools to automatically generate these
  1884.     formats from the original RFC 1327 tables;, some even distribute
  1885.     the tables within their networks in several formats. If you need
  1886.  
  1887.  
  1888. Houttuin               Expires November 1993                [Page 32]
  1889.  
  1890. Internet-Draft   X.400 - Internet mail gatewaying tutorial   May 1993
  1891.  
  1892.  
  1893.     mapping tables in a specific format, please contact your national
  1894.     or R&D network's gateway manager. See chapter 3.4 .
  1895.  
  1896.  
  1897. 3.7. Guidelines for mapping rule definition
  1898.  
  1899.     
  1900.     Beware that defining mapping rules without knowing what you are
  1901.     doing can be disastrous not only for your network, but also for
  1902.     others. You should be rather safe if you follow at least these
  1903.     rules:
  1904.         
  1905.         - First of all, read this tutorial;.
  1906.         
  1907.         - Don't use local mappings. (see chapter 3.5)
  1908.         
  1909.         - Make sure any domain you map to can also be mapped back;.
  1910.         
  1911.         - Aim for symmetry.
  1912.         
  1913.         - Don't define a gateway table entry if the same domain
  1914.           already has a map2 entry. Such a rule would be redundant.
  1915.         
  1916.         - Map to ADMD=0; if you will not be connected to any ADMD for
  1917.           the time being.
  1918.         
  1919.         - Only map to ADMD=  ; if you are indeed reachable though
  1920.           _any_ ADMD in your country.
  1921.         
  1922.         - Mind the difference between PRMD=; and PRMD=@; and make sure
  1923.           which one you need.
  1924.         
  1925.         - Don't define mappings for domains over which you have no
  1926.           naming authority.
  1927.         
  1928.         - Before defining a mapping rule, make sure you have the
  1929.           permission from the naming authority of the domain you want
  1930.           to map to. Normally, this should be the same organisation as
  1931.           the mapping authority of the domain in the left hand side of
  1932.           the mapping rule. This principle is called 'administrative
  1933.           equivalence'.
  1934.         
  1935.         - Avoid redundant mappings. E.g. is all domains under
  1936.           'tlec.nl' are in your control, don't define:
  1937.             
  1938.             first.tlec.nl#O$first.PRMD$tlec.ADMD$ade.C$nl#
  1939.             last.tlec.nl#O$last.PRMD$tlec.ADMD$ade.C$nl#
  1940.             always.tlec.nl#O$always.PRMD$tlec.ADMD$ade.C$nl#
  1941.  
  1942.  
  1943.  
  1944.  
  1945.  
  1946.  
  1947. Houttuin               Expires November 1993                [Page 33]
  1948.  
  1949. Internet-Draft   X.400 - Internet mail gatewaying tutorial   May 1993
  1950.  
  1951.  
  1952.         
  1953.           but rather have only one mapping rule:
  1954.             
  1955.             tlec.nl#PRMD$tlec.ADMD$ade.C$nl#
  1956.         
  1957.         - Before introducing a new mapped version of a domain, make
  1958.           sure the world can route to that mapped domain;.
  1959.         
  1960.           E.g. If you are operating a PRMD: C=zz; ADMD=ade; PRMD=ergo;
  1961.           and you want to define the mapping rules:
  1962.             
  1963.             map1: PRMD$ergo.ADMD$ade.C$zz#ergo.zz#
  1964.             map2: ergo.zz#PRMD$ergo.ADMD$ade.C$zz#
  1965.         
  1966.           Make sure that ergo.zz is DNS routeable (has an A or an MX
  1967.           record) and will be routed to a gateway that will route the
  1968.           mails from the Internet to you over X.400.
  1969.         
  1970.           In the other direction, if you are operating the Internet
  1971.           domain cs.woodstock.edu, and you want to define a mapping
  1972.           for that domain:
  1973.             
  1974.             map2: cs.woodstock.edu#O$cs.PRMD$woodstock.ADMD$ .C$us#
  1975.             map1: O$cs.PRMD$woodstock.ADMD$ .C$us#cs.woodstock.edu#
  1976.         
  1977.           Make sure that C=us; ADMD= ; PRMD=woodstock; O=cs; is
  1978.           routeable in the X.400 world and will be routed to a gateway
  1979.           that will route the mails from X.400 to your RFC 822 domain
  1980.           over SMTP. Within the GO-MHS community, this would be done
  1981.           by registering a line in a so-called domain document, which
  1982.           will state to which mail relay this domain should be routed.
  1983.         
  1984.           Co-ordinate any such actions with your national or MHS'
  1985.           gateway manager. See chapter 3.4.
  1986.  
  1987.  
  1988. 4. Conclusion
  1989.  
  1990.     
  1991.     Mail gatewaying remains a complicated subject. If after reading
  1992.     this tutorial, you feel you understand the basics, try solving
  1993.     some real-life problems. This is indeed a very rewarding area to
  1994.     work in: even after having worked with it for many years, you can
  1995.     make amazing discoveries every other week........
  1996.  
  1997.  
  1998.  
  1999.  
  2000.  
  2001.  
  2002.  
  2003.  
  2004.  
  2005.  
  2006. Houttuin               Expires November 1993                [Page 34]
  2007.  
  2008. Internet-Draft   X.400 - Internet mail gatewaying tutorial   May 1993
  2009.  
  2010.  
  2011.  
  2012.  
  2013.  
  2014.  
  2015.  
  2016.  
  2017.  
  2018.  
  2019. Appendix A. References
  2020.  
  2021.       
  2022.       [821]       RFC 821; Jonathan B. Postel; SIMPLE MAIL TRANSFER
  2023.                   PROTOCOL; University of Southern California; August
  2024.                   1982
  2025.       
  2026.       [822]       RFC 822; Crocker, D.; Standard of the Format of ARPA
  2027.                   Internet Text Messages; University of Delaware,
  2028.                   August 1982
  2029.       
  2030.       [987]       RFC 987; Steve Kille; Mapping between X.400 and RFC
  2031.                   822; UK Academic Community Report (MG.19), June
  2032.                   1986
  2033.       
  2034.       [1280]      RFC 1280; Jon Postel; IAB OFFICIAL PROTOCOL
  2035.                   STANDARDS; USC/Information Sciences Institute,
  2036.                   March 1992
  2037.       
  2038.       [1310]      RFC 1310; Lyman Chapin; The Internet Standards
  2039.                   Process; BBN Communications Corporation, March 1992
  2040.       
  2041.       [1327]      RFC 1327; Steve Kille; Mapping between X.400(1988) /
  2042.                   ISO 10021 and RFC 822; University College London,
  2043.                   May 1992
  2044.       
  2045.       [1328]      RFC 1328; Steve Kille; X.400 1988 to 1984
  2046.                   downgrading; University College London, May 1992
  2047.       
  2048.       [BP-88]     Bernhard Plattner, Hannes Lubich; Electronic Mail
  2049.                   Systems and Protocols Overview and Case Study;
  2050.                   Proceedings of the IFIP WG 6.5 International
  2051.                   working conference on message handling systems and
  2052.                   distributed applications; Costa Mesa 1988; North-
  2053.                   Holland, 1989
  2054.       
  2055.       [JH-92]     Jeroen Houttuin; @route:100%name@address, a
  2056.                   practical guide to MHS configuration; Top-Level EC
  2057.                   1992 (not yet published)
  2058.       
  2059.       [HTA-faq]   Harald Tveit Alvestrand; Frequently asked questions
  2060.                   on X.400. Regularly posted on USEnet in newsgroup
  2061.                   comp.protocols.iso.x400
  2062.       
  2063.  
  2064.  
  2065. Houttuin               Expires November 1993                [Page 35]
  2066.  
  2067. Internet-Draft   X.400 - Internet mail gatewaying tutorial   May 1993
  2068.  
  2069.  
  2070.       [MSG-93]    Jeroen Houttuin, Klaus Hansen, Serge Aumont; RFC
  2071.                   1327 address mapping authorities. RARE WG-MSG
  2072.                   working draft: Internet-Draft 'draft-houttuin-
  2073.                   mapauth-00.txt'.
  2074.       
  2075.       [pug]       COSINE MHS Pocket User Guide. COSINE MHS Project
  2076.                   Team 1992. Also available in several languages from
  2077.                   the MHS Co-ordination server,
  2078.                   nic.switch.ch:/public/user-guides . See chapter
  2079.                   3.4.
  2080.       
  2081.       [RG-87]     Rudiger Grimm, Steinar Haug; A minimum Profile for
  2082.                   RFC 987; GMD, November 1987; RARE MHS Project Team;
  2083.                   July 1990. Also available from
  2084.                   nic.switch.ch:/procedures/min-rfc987-profile . See
  2085.                   chapter 3.4.
  2086.       
  2087.       [X.4xx(84)] CCITT Recommendations X.400 - X.430. Data
  2088.                   Communication Networks: Message Handling Systems.
  2089.                   CCITT Red Book, Vol. VIII - Fasc. VIII.7, Malaga-
  2090.                   Torremolinos 1984
  2091.       
  2092.       [X.4xx(88)] CCITT Recommendations X.400 - X.420. Data
  2093.                   Communication Networks: Message Handling Systems.
  2094.                   CCITT Blue Book, Vol. VIII - Fasc. VIII.7,
  2095.                   Melbourne 1988
  2096.  
  2097.  
  2098. Appendix C. Abbreviations
  2099.  
  2100.       ADMD     Administration Management Domain
  2101.       ASCII    American Standard Code for Information Exchange
  2102.       ASN.1    Abstract Syntax Notation One
  2103.       BCD      Binary-Coded Decimal
  2104.       BITNET   Because It's Time NETwork
  2105.       CCITT    Comite Consultatif International de Telegraphique et
  2106.                Telephonique
  2107.       COSINE   Co-operation for OSI networking in Europe
  2108.       DARPA    Defense Advanced Research Projects Agency
  2109.       DFN      Deutsches Forschungsnetz
  2110.       DL       Distribution List
  2111.       DNS      Domain Name System
  2112.       DoD      Department of Defense
  2113.       EBCDIC   Extended BCD Interchange Code
  2114.       IAB      Internet Activities Board
  2115.       IEC      International Electrotechnical Commission
  2116.       IESG     Internet Engineering Steering Group
  2117.       IETF     Internet Engineering Task Force
  2118.       IP       Internet Protocol.
  2119.       IPM      Inter-Personal Message
  2120.       IPMS     Inter-Personal Messaging Service
  2121.       IPN      Inter-Personal Notification
  2122.  
  2123.  
  2124. Houttuin               Expires November 1993                [Page 36]
  2125.  
  2126. Internet-Draft   X.400 - Internet mail gatewaying tutorial   May 1993
  2127.  
  2128.  
  2129.       ISO      International Organisation for Standardisation
  2130.       ISODE    ISO Development Environment
  2131.       JNT      Joint Network Team (UK)
  2132.       JTC      Joint Technical Committee (ISO/IEC)
  2133.       MHS      Message Handling System
  2134.       MOTIS    Message-Oriented Text Interchange Systems
  2135.       MTA      Message Transfer Agent
  2136.       MTL      Message Transfer Layer
  2137.       MTS      Message Transfer System
  2138.       MX       Mail eXchanger
  2139.       OSI      Open Systems Interconnection
  2140.       OU(s)    Organizational Unit(s)
  2141.       PP       Mail gatewaying software (not an abbreviation)
  2142.       PRMD     Private Management Domain
  2143.       RARE     Reseaux Associes pour la Recherche Europeenne
  2144.       RFC      Request for comments
  2145.       RTC      RARE Technical Committee
  2146.       RTR      RARE Technical Report
  2147.       SMTP     simple mail transfer protocol
  2148.       TCP      Transmission Control Protocol
  2149.       UUCP     Unix to Unix CoPy
  2150.  
  2151.  
  2152. Appendix D. Author's address
  2153.  
  2154.     
  2155.     Jeroen Houttuin
  2156.     RARE Secretariat
  2157.     Singel 466-468
  2158.     NL-1017 AW Amsterdam, Europe
  2159.     
  2160.     Tel. +31 20 6391131
  2161.     Fax. +31 20 6393289
  2162.     RFC 822: houttuin@rare.nl
  2163.     X.400:   C=nl;ADMD=400net;PRMD=surf;O=rare;S=houttuin
  2164.  
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183. Houttuin               Expires November 1993                [Page 37]
  2184.  
  2185.